-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Add support for Renesas RA CEU (Capture Engine Unit) for RA8M1 and RA8D1 #92146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add support for Renesas RA CEU (Capture Engine Unit) for RA8M1 and RA8D1 #92146
Conversation
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for implementing the Renesas video driver!
The driver appears in a good shape WRT video APIs, with a few key points to modify (marked with :x), and a few proposal to improve it further, non-blocking (i.e. could be improved over time eventually, although appreciated if modified now).
Let me know if anything needs clarifications.
[blocking ❌] |
} | ||
} | ||
|
||
static int video_renesas_ra_ceu_get_format(const struct device *dev, struct video_format *fmt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function name is rather long, could it be shorten like ra_ceu_get_format
?. Idem for others
drivers/video/video_renesas_ra_ceu.c
Outdated
fsp_err_t err; | ||
int ret; | ||
|
||
fmt->pitch = fmt->width * video_bits_per_pixel(fmt->pixelformat) / BITS_PER_BYTE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a big deal but fmt->pitch
should be computed at the end when everything is OK as it is the value that application will read back.
child-binding: | ||
child-binding: | ||
include: video-interfaces.yaml | ||
|
||
properties: | ||
hsync-active: | ||
required: true | ||
|
||
vsync-active: | ||
required: true | ||
|
||
pclk-sample: | ||
required: true | ||
|
||
vsync-sample: | ||
required: true | ||
type: int | ||
enum: | ||
- 0 # Falling edge | ||
- 1 # Rising edge | ||
description: | | ||
Sample on the falling or rising edge of the vsync signal. | ||
|
||
hsync-sample: | ||
required: true | ||
type: int | ||
enum: | ||
- 0 # Falling edge | ||
- 1 # Rising edge | ||
description: | | ||
Sample on the falling or rising edge of the hsync signal. | ||
|
||
bus-width: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you redefine many properties that are already defined in video-interfaces.yaml
?
Update hal_renesas to support CEU on RA SoCs Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com> Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Add support for the Renesas RA Capture Engine Unit (CEU), including driver source files, Kconfig options, and DTS bindings. - Add initial implementation of the RA CEU driver - Add dedicated Kconfig and CMake integration - Provide Devicetree bindings for the RA CEU - Update module Kconfig to include the new driver This enables image capture functionality using the CEU peripheral on Renesas RA series MCUs. Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com> Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Add pin definitions required by the RA Capture Engine Unit Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com> Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Add CEU to r7fa8d1xh.dtsi and r7fa8m1xh.dtsi Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
- Add CEU pin configuration to ek_ra8d1-pinctrl.dtsi - Enable CEU node and Arducam 20-pin connector in ek_ra8d1.dts - Configure PWM3 as external XCLK via pwm-clock node - Update board YAML to declare video support Signed-off-by: Duy Vo <duy.vo.xc@bp.renesas.com> Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Support OV7670 DVP 20-pin shield on the EK-RA8D1 board Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Add EK-RA8D1 board support for capture and capture_to_lvgl samples Signed-off-by: Khanh Nguyen <khanh.nguyen.wz@bp.renesas.com>
Add SW1 configuration for using Camera Exapansion Port (J59) Signed-off-by: Thao Luong <thao.luong.uw@renesas.com>
92a4b3b
to
03bdbce
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the modifications!
I have "folded" the points it does resolve to allow you to keep track of feedback.
A few items left might need some adjustment (i.e. for CI), but I am looking forward to see this merged!
\ | ||
PINCTRL_DT_INST_DEFINE(inst); \ | ||
\ | ||
static struct video_renesas_ra_ceu_config video_renesas_ra_ceu_config##inst = { \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the latest changes, it might be enough to add const
:
- static struct video_renesas_ra_ceu_config video_renesas_ra_ceu_config##inst = { \
+ static const struct video_renesas_ra_ceu_config video_renesas_ra_ceu_config##inst = { \
@@ -11,6 +11,7 @@ tests: | |||
- platform:mimxrt1170_evk/mimxrt1176/cm7:SHIELD="nxp_btb44_ov5640;rk055hdmipi4ma0" | |||
- platform:mimxrt1170_evk@B/mimxrt1176/cm7:SHIELD="nxp_btb44_ov5640;rk055hdmipi4ma0" | |||
- platform:frdm_mcxn947/mcxn947/cpu0:SHIELD="dvp_20pin_ov7670;lcd_par_s035_8080" | |||
- platform:ek_ra8d1:SHIELD="dvp_20pin_ov7670;rtkmipilcdb00000be" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blocking ❌]
It is possible that the current CI failure happens as the sample.yaml
platform definition need the board listed with all the qualifiers. Maybe something like this but am not familiar enough with this chip to be entirely sure:
- platform:ek_ra8d1:SHIELD="dvp_20pin_ov7670;rtkmipilcdb00000be" | |
- platform:ek_ra8d1/r7fa8d1bhecbd:SHIELD="dvp_20pin_ov7670;rtkmipilcdb00000be" |
Add support for Renesas RA CEU (Capture Engine Unit):
It works with OV7670 camera, and MIPI graphics expansion board included in the Kit